package demo.spring.boot.health;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;

/**
 * 健康状态检查、remote-debug、
 * <p>
 * Created by chenlushun on 2016/12/8.
 */
@SpringBootApplication
@EnableWebSecurity
public class SpringBootHealthApplicationDemo {

    /**
     * Banner location property key.
     */

    private static final String CONFIGURABLE_WEB_ENVIRONMENT_CLASS = "org.springframework.web.context.ConfigurableWebEnvironment";

    private static final String SYSTEM_PROPERTY_JAVA_AWT_HEADLESS = "java.awt.headless";

    public static void main(String[] args) {
        //System.setProperty("spring.devtools.restart.enabled", "false");

        SpringApplication.run(SpringBootHealthApplicationDemo.class, args);

    }

    private void configureHeadlessProperty() {
        System.setProperty(SYSTEM_PROPERTY_JAVA_AWT_HEADLESS, System.getProperty(
                SYSTEM_PROPERTY_JAVA_AWT_HEADLESS, Boolean.toString(true)));
    }

//    private SpringApplicationRunListeners getRunListeners(String[] args) {
//        Class<?>[] types = new Class<?>[] { SpringApplication.class, String[].class };
//        return new SpringApplicationRunListeners(logger, getSpringFactoriesInstances(
//                SpringApplicationRunListener.class, types, this, args));
//    }

}
